<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: huasheng
  Date: 2023/11/24
  Time: 17:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<!-- 修改对话框 -->
<div class="modal fade" id="modal_dept_edit" role="dialog" aria-labelledby="modal_dept_edit" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <form id="form_dept" method="post" action="saveXxx">
                    <input type="hidden" name="id" id="hidden_txt_dept_id" value="${product.id}"/>
                    <table style="border-collapse:separate; border-spacing:0px 10px;">
                        <tr>
                            <td>商品：</td>
                            <td><input type="text" id="name" name="name"
                                       class="form-control" aria-required="true" value="${product.name}" required/>
                                <span style="color: red;" id="s"></span></td>
                        </tr>
                        <tr>
                            <td>价格：</td>
                            <td><input type="text" id="price" name="price"
                                       class="form-control" aria-required="true" value="${product.price}" required/></td>
                        </tr>
                        <tr>
                            <td>状态：</td>
                            <td><input type="radio"  name="status" value="0" <c:if test="${product.status==0}">checked</c:if>/>售罄
                                <input type="radio"  name="status" value="1" <c:if test="${product.status==1}">checked</c:if>/>在售</td>
                        </tr>
                        <%-- <tr>
                             <td>特点：</td>  &lt;%&ndash;类似单选框&ndash;%&gt;
                             <td><input type="checkbox" id="a" name="expressTrait" value="热心"/>热心
                                 <input type="checkbox" id="b" name="expressTrait" value="耐心"/>耐心
                                 <input type="checkbox" id="c" name="expressTrait" value="倾心"/>倾心
                             </td>
                         </tr>
                         --%>
                         <tr>
                             <td>公司：</td>
                             <td> <select name="yid">
                                 <option value="">请选择</option>
                                 <c:forEach items="${fu}" var="fu">
                                     <option value="${fu.cid}" <c:if test="${fu.cid==ga.yid}">selected</c:if> >${fu.cname}</option>
                                 </c:forEach>
                             </select>
                             </td>
                         </tr>
                        <tr>
                            <td> 生产时间：</td>
                            <td><input type="date" name="time" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${product.time}'></fmt:formatDate>"></td>
                        </tr>
                        <tr>
                            <td valign="middle">描述：</td>
                            <td colspan="4"><textarea rows="7" cols="50" name="deptDescription" id="dept_description" >${product.ms}</textarea></td>
                        </tr>
                    </table>

                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary" id="submit_form_dept_btn">保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </form>

            </div>

        </div>

    </div>

</div>

</body>
</html>
